package com.jasonli.service.impl;

import com.jasonli.dao.ClientDao;
import com.jasonli.domain.Client;
import com.jasonli.service.ClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClientServiceImpl implements ClientService {

    @Autowired
    private ClientDao clientDao;

    public Client getByUsernameAndPassword(String username, String password) {
        return clientDao.getByUsernameAndPassword(username,password);
    }

    public boolean save(Client client) {
        clientDao.save(client);
        return true;
    }

    public List<Client> getAll() {
        return clientDao.getAll();
    }
}
